package demo6;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

@Component
//@Scope("singleton")//设置单例,默认是单例,不用写,
@Scope("prototype")//设置多例,每次向Spring容器中获取bean时,都会创建一个新的对象
public class Person {

}
